package OperateurSystem.GestionColisPackage;

/**
 * Enum definition : EnumEtatColis
 *
 * @author OpenORB Compiler
*/
public final class EnumEtatColis implements org.omg.CORBA.portable.IDLEntity
{
    /**
     * Enum member EN_TRANSIT value 
     */
    public static final int _EN_TRANSIT = 0;

    /**
     * Enum member EN_TRANSIT
     */
    public static final EnumEtatColis EN_TRANSIT = new EnumEtatColis(_EN_TRANSIT);

    /**
     * Enum member ARRIVE value 
     */
    public static final int _ARRIVE = 1;

    /**
     * Enum member ARRIVE
     */
    public static final EnumEtatColis ARRIVE = new EnumEtatColis(_ARRIVE);

    /**
     * Enum member EN_DEPART value 
     */
    public static final int _EN_DEPART = 2;

    /**
     * Enum member EN_DEPART
     */
    public static final EnumEtatColis EN_DEPART = new EnumEtatColis(_EN_DEPART);

    /**
     * Internal member value 
     */
    private final int _EnumEtatColis_value;

    /**
     * Private constructor
     * @param  the enum value for this new member
     */
    private EnumEtatColis( final int value )
    {
        _EnumEtatColis_value = value;
    }

    /**
     * Maintains singleton property for serialized enums.
     * Issue 4271: IDL/Java issue, Mapping for IDL enum.
     */
    public java.lang.Object readResolve() throws java.io.ObjectStreamException
    {
        return from_int( value() );
    }

    /**
     * Return the internal member value
     * @return the member value
     */
    public int value()
    {
        return _EnumEtatColis_value;
    }

    /**
     * Return a enum member from its value
     * @param  an enum value
     * @return an enum member
         */
    public static EnumEtatColis from_int(int value)
    {
        switch (value)
        {
        case 0 :
            return EN_TRANSIT;
        case 1 :
            return ARRIVE;
        case 2 :
            return EN_DEPART;
        }
        throw new org.omg.CORBA.BAD_OPERATION();
    }

    /**
     * Return a string representation
     * @return a string representation of the enumeration
     */
    public java.lang.String toString()
    {
        switch (_EnumEtatColis_value)
        {
        case 0 :
            return "EN_TRANSIT";
        case 1 :
            return "ARRIVE";
        case 2 :
            return "EN_DEPART";
        }
        throw new org.omg.CORBA.BAD_OPERATION();
    }

}
